<!DOCTYPE html>
<html lang="zh-CN">
    <head>
        <meta charset="UTF-8" />
        <title>05_apply-参数的使用</title>
    </head>
    <body>
        <script>
            var person = {
                name:'马志强'
            }

            var dog = {
                name:'甜甜',
                eat:function(a,b){
                    console.log(this);
                    console.log('肉' + a + b);
                }
            }
            var a = ['酒', '铁锅炖'];
            // call方法和apply方法的区别 就在于 参数不一样
            dog.eat.apply(person, a);
            dog.eat.call(person,'酒','铁锅炖');


        </script>
    </body>
</html>